package www.xpu.edu.app;


import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.TextView;

import java.util.List;

public class Stu13_Adpter extends ArrayAdapter {
    private int id;
    public Stu13_Adpter(Context context, int resource,  List<Stu13> objects) {
        super(context, resource, objects);
        id=resource;
    }

    @Override
    public View getView(int position,View convertView,ViewGroup parent) {
        //return super.getView(position, convertView, parent);
        Stu13 stu13= (Stu13) getItem(position);
        View view=LayoutInflater.from(getContext()).inflate(id,parent,false);
        TextView text1=view.findViewById(R.id.stu13_adapter_text1);
        TextView text2=view.findViewById(R.id.stu13_adapter_text2);
        TextView text3=view.findViewById(R.id.stu13_adapter_text3);
        TextView text4=view.findViewById(R.id.stu13_adapter_text4);
        text1.setText(stu13.getAddress());
        text2.setText(stu13.getJobname());
        text3.setText(stu13.getTime());
        text4.setText(stu13.getWeap());
        return view;
    }
}
